package com.gosophia.metadataEngine.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.web.action.BaseSupportAction;
import com.gosophia.metadataEngine.dto.MetaDataFieldDto;
import com.gosophia.metadataEngine.ws.MetadataEngineWebService;
/**
 * 获取元数据表结构
 * @author wangxinbing
 *
 */
@Controller("GetMetadataStructureByMetadatatableIdAction")
@Scope("prototype")
public class GetMetadataStructureByMetadatatableIdAction extends
		BaseSupportAction {

	private Long metaDataTableId;
	
	private List<MetaDataFieldDto> metaDataFieldDtos;
	
	@Autowired
	private MetadataEngineWebService metadataEngineWebService;
	
	@Override
	public String _execute() throws Exception {
		metaDataFieldDtos =  metadataEngineWebService.findMetaDataFieldByTableId(metaDataTableId);
		return SUCCESS;
	}
	public Long getMetaDataTableId() {
		return metaDataTableId;
	}
	public void setMetaDataTableId(Long metaDataTableId) {
		this.metaDataTableId = metaDataTableId;
	}
	public List<MetaDataFieldDto> getMetaDataFieldDtos() {
		return metaDataFieldDtos;
	}
	public void setMetaDataFieldDtos(List<MetaDataFieldDto> metaDataFieldDtos) {
		this.metaDataFieldDtos = metaDataFieldDtos;
	}
}
